package com.fb.service.impl;

import com.fb.dao.FengMapper;
import com.fb.model.Feng;
import com.fb.service.IFengService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FengServiceImpl implements IFengService {
    private Logger log = Logger.getLogger(getClass());
    @Autowired
    private FengMapper fengDao;

    @Override
    public Feng add(Feng feng) {
        fengDao.insertSelective(feng);
        return feng;
    }

    @Override
    public List<Feng> list(Feng feng) {
        return fengDao.query(feng);
    }

    @Override
    public Feng update(Feng feng) {
        fengDao.updateByPrimaryKeySelective(feng);
        return feng;
    }
}
